package _01_OOP;

public class OOP_02 {
	public static void main(String[] args) {
		// 创建 Student 对象
		Student stu01 = new Student();

		// 对 stu01 对象中的 addr 设置为河北
		stu01.addr = "河北";

		// 除了addr是河北以外,其他属性都是默认值
		System.out.println("addr=" + stu01.addr);
		System.out.println("id=" + stu01.id);
		System.out.println("name=" + stu01.name);
		System.out.println("sex=" + stu01.sex);
		System.out.println("age=" + stu01.age);
//		addr=河北
//				id=0
//				name=null
//				sex=false
//				age=0
		System.out.println("-----");

		stu01.id = 10;
		stu01.name = "张三";
		stu01.age = -17;
		stu01.addr = "石家庄";
		System.out.println("addr=" + stu01.addr);
		System.out.println("id=" + stu01.id);
		System.out.println("name=" + stu01.name);
		System.out.println("sex=" + stu01.sex);
		System.out.println("age=" + stu01.age);
//		addr=石家庄
//				id=10
//				name=张三
//				sex=false
//				age=-17

	}
}
